<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8" />
        <title>自定义菜单</title>
        <link rel="stylesheet" href="/Public/Leader/css/bootstrap.css">
        <link rel="stylesheet" type="text/css" href="/Public/Leader/css/index.css" />
        <style type="text/css">
            .order-list a {
                position: relative;
            }
            .order-list span {
                float: right;
                margin-right: 20px;
            }
        </style>
    </head>

    <body>
        <style>
    .pagination .current{
        float: left;
    padding: 0 14px;
    line-height: 38px;
    text-decoration: none; 
    border-left-width: 0;
    }
        
</style>
<div id="topbar" class="top-navigation dark-bg ">
            <nav class="navbar   dark-bg " role="navigation" style="width:85%;margin:auto;">
                <div class="navbar-header" style="width:200px;">
                    <button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
                        <i class="fa fa-reorder"></i>
                    </button>
                    <a class="navbar-brand" href="<?php echo U('Index/index');?>">小易出行</a>
                </div>
                <div class="navbar-collapse collapse" id="navbar">
                    <ul class="nav navbar-nav dark-bg">
                        

                        <li <?php if($table == 'index'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Index/index');?>"> 首页</a>
                        </li>

                        <li <?php if($table == 'order'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Order/orderadmin');?>">订单管理</a>
                        </li>

                        <li <?php if($table == 'pay'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Pay/paycount');?>">交易中心</a>
                        </li>
                        <li <?php if($table == 'article'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Article/lst');?>">文章</a>
                        </li>
                        <li <?php if($table == 'wx'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Wx/wx_menu/wid/1');?>">微信管理</a>
                        </li>
                        <li <?php if($table == 'line'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Line/lineadmin');?>">线路管理</a>
                        </li>
                        <li <?php if($table == 'user'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('User/userinfo');?>">用户管理</a>
                        </li>
                        <li <?php if($table == 'useradmin'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Useradmin/userinfo');?>">系统管理</a>
                        </li>

                    </ul>
                    <ul class="nav navbar-top-links navbar-right">
                        <li class="dropdown">
                            <a aria-expanded="false" role="button" href="#" class="dropdown-toggle" data-toggle="dropdown" style="position:relative;" onclick="$(this).find('span').toggleClass('deg180')">
                                <name style="width: 80px;white-space:nowrap;overflow:hidden;text-overflow: ellipsis;display: block;text-align: center"><?php echo session('username');?></name>
                                <span class="caret" style="position: absolute;top: 22px;right: 12px;"></span></a>
                            <ul role="menu" class="dropdown-menu">
                                <li>
                                    <a onclick="return confirm('您确定要退出吗？')" tabindex="-1" href="<?php echo U('Login/Logout');?>">退出</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </nav>
        </div>
        <div class="wrapper main-wrapper wrapper-content ">
            <div class="page-menubar">
                <!--<div class="menu-header">微信管理</div>-->
                <ul class="order-list">
                    <li class="active">
                        <a href="<?php echo U('Wx/wx_menu/wid/1');?>"><img src="/Public/images/ic-11.png" alt="" class="com-icon">自定义菜单</a>
                    </li>
                    <li>
                        <a href="<?php echo U('Wx/huifu');?>"><img src="/Public/images/ic-12.png" alt="" class="com-icon">关注时回复</a>
                    </li>
                    <li>
                        <a href="<?php echo U('Wx/zdhf');?>"><img src="/Public/images/ic-13.png" alt="" class="com-icon">自动回复</a>
                    </li>
                </ul>
            </div>
            <!--主要内容-->
            <div class="page-content" style="display: block;">
                <!--内容标题-->
                <div class="page-heading">
                    <h2>自定义菜单</h2>
                </div>
                <div id="myTabContent" class="tab-content">
                    <div class="tab-pane active in" id="home">
                        <form id="form1" name="form1" method="post" action="">
                            <div class="g-main-body">
                                <div class="g-main-content m-form-horizontal">

                                    <span><div class="alert alert-success text-center"><font size="+2">菜单一</font></div></span>
                                    <table id="table1"  class="table">
                                        <tr>
                                            <td>
                                                一级菜单：
                                            </td>
                                            <td>
                                                <select name="first_type" id="select">
                                                    <option value="<?php echo ($data['first_type']); ?>" selected="selected"><?php echo ($data['first_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="first"  value="<?php echo ($data["first"]); ?>" len="50" class="form-control" />
                                            </td>
                                            <td> <input type="text" name="first_value"  value="<?php echo ($data["first_value"]); ?>" len="250" class="form-control" /></td>
                                        </tr>

                                        <tr>
                                            <td>
                                                二级菜单1：
                                            </td>
                                            <td>
                                                <select name="first1_1_type" id="select">
                                                    <option value="<?php echo ($data["first1_1_type"]); ?>" selected="selected"><?php echo ($data["first1_1_type"]); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="first1_1"  value="<?php echo ($data['first1_1']); ?>" len="50"  class="form-control"/></td>
                                            <td> <input type="text" name="first1_1_value"  value="<?php echo ($data['first1_1_value']); ?>" len="250" class="form-control" /></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                二级菜单2：
                                            </td>
                                            <td>
                                                <select name="first1_2_type" id="select">
                                                    <option value="<?php echo ($data['first1_2_type']); ?>" selected="selected"><?php echo ($data['first1_2_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="first1_2"  value="<?php echo ($data['first1_2']); ?>" len="50"  class="form-control"/></td>
                                            <td> <input type="text" name="first1_2_value"  value="<?php echo ($data['first1_2_value']); ?>" len="250" class="form-control" /></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                二级菜单3：
                                            </td>
                                            <td>
                                                <select name="first1_3_type" id="select">
                                                    <option value="<?php echo ($data['first1_3_type']); ?>" selected="selected"><?php echo ($data['first1_3_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="first1_3"  value="<?php echo ($data['first1_3']); ?>" len="50"  class="form-control"/></td>
                                            <td> <input type="text" name="first1_3_value"  value="<?php echo ($data['first1_3_value']); ?>" len="250" class="form-control" /></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                二级菜单4：
                                            </td>
                                            <td>
                                                <select name="first1_4_type" id="select">
                                                    <option value="<?php echo ($data['first1_4_type']); ?>" selected="selected"><?php echo ($data['first1_4_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="first1_4"  value="<?php echo ($data['first1_4']); ?>" len="50"  class="form-control"/></td>
                                            <td> <input type="text" name="first1_4_value"  value="<?php echo ($data['first1_4_value']); ?>" len="250" class="form-control" /></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                二级菜单5：
                                            </td>
                                            <td>
                                                <select name="first1_5_type" id="select">
                                                    <option value="<?php echo ($data['first1_5_type']); ?>" selected="selected"><?php echo ($data['first1_5_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="first1_5"  value="<?php echo ($data['first1_5']); ?>" len="50"  class="form-control"/></td>
                                            <td> <input type="text" name="first1_5_value"  value="<?php echo ($data['first1_5_value']); ?>" len="250" class="form-control" /></td>
                                        </tr>

                                    </table>
                                    <span><div class="alert alert-success text-center"><font size="+2">菜单二</font></div></span>
                                    <table id="table1"  class="table">
                                        <tr>
                                            <td>
                                                一级菜单：
                                            </td>
                                            <td>
                                                <select name="second_type" id="select">
                                                    <option value="<?php echo ($data['second_type']); ?>" selected="selected"><?php echo ($data['second_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="second"  value="<?php echo ($data["second"]); ?>" len="50" class="form-control" />
                                            </td>
                                            <td> <input type="text" name="second_value"  value="<?php echo ($data["second_value"]); ?>" len="250" class="form-control" /></td>
                                        </tr>

                                        <tr>
                                            <td>
                                                二级菜单1：
                                            </td>
                                            <td>
                                                <select name="second1_1_type" id="select">
                                                    <option value="<?php echo ($data['second1_1_type']); ?>" selected="selected"><?php echo ($data['second1_1_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="second1_1"  value="<?php echo ($data['second1_1']); ?>" len="50"  class="form-control"/></td>
                                            <td> <input type="text" name="second1_1_value"  value="<?php echo ($data['second1_1_value']); ?>" len="250" class="form-control" /></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                二级菜单2：
                                            </td>
                                            <td>
                                                <select name="second1_2_type" id="select">
                                                    <option value="<?php echo ($data['second1_2_type']); ?>" selected="selected"><?php echo ($data['second1_2_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="second1_2"  value="<?php echo ($data['second1_2']); ?>" len="50"  class="form-control"/></td>
                                            <td> <input type="text" name="second1_2_value"  value="<?php echo ($data['second1_2_value']); ?>" len="250" class="form-control" /></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                二级菜单3：
                                            </td>
                                            <td>
                                                <select name="second1_3_type" id="select">
                                                    <option value="<?php echo ($data['second1_3_type']); ?>" selected="selected"><?php echo ($data['second1_3_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="second1_3"  value="<?php echo ($data['second1_3']); ?>" len="50"  class="form-control"/></td>
                                            <td> <input type="text" name="second1_3_value"  value="<?php echo ($data['second1_3_value']); ?>" len="250" class="form-control" /></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                二级菜单4：
                                            </td>
                                            <td>
                                                <select name="second1_4_type" id="select">
                                                    <option value="<?php echo ($data['second1_4_type']); ?>" selected="selected"><?php echo ($data['second1_4_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="second1_4"  value="<?php echo ($data['second1_4']); ?>" len="50"  class="form-control"/></td>
                                            <td> <input type="text" name="second1_4_value"  value="<?php echo ($data['second1_4_value']); ?>" len="250" class="form-control" /></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                二级菜单5：
                                            </td>
                                            <td>
                                                <select name="second1_5_type" id="select">
                                                    <option value="<?php echo ($data['second1_5_type']); ?>" selected="selected"><?php echo ($data['second1_5_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="second1_5"  value="<?php echo ($data['second1_5']); ?>" len="50"  class="form-control"/></td>
                                            <td> <input type="text" name="second1_5_value"  value="<?php echo ($data['second1_5_value']); ?>" len="250" class="form-control" /></td>
                                        </tr>

                                    </table>
                                    <span><div class="alert alert-success text-center"><font size="+2">菜单三</font></div></span>
                                    <table id="table1"  class="table">
                                        <tr>
                                            <td>
                                                一级菜单：
                                            </td>
                                            <td>
                                                <select name="third_type" id="select">
                                                    <option value="<?php echo ($data['third_type']); ?>" selected="selected"><?php echo ($data['third_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="third"  value="<?php echo ($data["third"]); ?>" len="50" class="form-control" />
                                            </td>
                                            <td> <input type="text" name="third_value"  value="<?php echo ($data["third_value"]); ?>" len="250" class="form-control" /></td>
                                        </tr>

                                        <tr>
                                            <td>
                                                二级菜单1：
                                            </td>
                                            <td>
                                                <select name="third1_1_type" id="select">
                                                    <option value="<?php echo ($data['third1_1_type']); ?>" selected="selected"><?php echo ($data['third1_1_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="third1_1"  value="<?php echo ($data['third1_1']); ?>" len="50"  class="form-control"/></td>
                                            <td> <input type="text" name="third1_1_value"  value="<?php echo ($data['third1_1_value']); ?>" len="250" class="form-control" /></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                二级菜单2：
                                            </td>
                                            <td>
                                                <select name="third1_2_type" id="select">
                                                    <option value="<?php echo ($data['third1_2_type']); ?>" selected="selected"><?php echo ($data['third1_2_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="third1_2"  value="<?php echo ($data['third1_2']); ?>" len="50"  class="form-control"/></td>
                                            <td> <input type="text" name="third1_2_value"  value="<?php echo ($data['third1_2_value']); ?>" len="250" class="form-control" /></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                二级菜单3：
                                            </td>
                                            <td>
                                                <select name="third1_3_type" id="select">
                                                    <option value="<?php echo ($data['third1_3_type']); ?>" selected="selected"><?php echo ($data['third1_3_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="third1_3"  value="<?php echo ($data['third1_3']); ?>" len="50"  class="form-control"/></td>
                                            <td> <input type="text" name="third1_3_value"  value="<?php echo ($data['third1_3_value']); ?>" len="250" class="form-control" /></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                二级菜单4：
                                            </td>
                                            <td>
                                                <select name="third1_4_type" id="select">
                                                    <option value="<?php echo ($data['third1_4_type']); ?>" selected="selected"><?php echo ($data['third1_4_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="third1_4"  value="<?php echo ($data['third1_4']); ?>" len="50"  class="form-control"/></td>
                                            <td> <input type="text" name="third1_4_value"  value="<?php echo ($data['third1_4_value']); ?>" len="250" class="form-control" /></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                二级菜单5：
                                            </td>
                                            <td>
                                                <select name="third1_5_type" id="select">
                                                    <option value="<?php echo ($data['third1_5_type']); ?>" selected="selected"><?php echo ($data['third1_5_type']); ?></option>
                                                    <option value="click">click</option>
                                                    <option value="view">view</option>
                                                </select>

                                            </td>
                                            <td>  <input type="text" name="third1_5"  value="<?php echo ($data['third1_5']); ?>" len="50"  class="form-control"/></td>
                                            <td> <input type="text" name="third1_5_value"  value="<?php echo ($data['third1_5_value']); ?>" len="250" class="form-control" /></td>
                                        </tr>

                                    </table>
                                    <div class="formitm form-submit">
                                        <div class="ipt" style="padding:0 0 20px;">
                                            <div class="tip" id="tips"></div>
                                            <button type="submit" class="btn btn-primary">保存</button>
                                            <a href="<?php echo U('Wx/create_menu',array('wid'=>'1'));?>" ><button type="button" class="btn btn-link">先点击左边保存，然后再点击此处生成自定义菜单</button></a>
                                        </div>
                                    </div>  



                                </div>
                            </div>

                        </form>
                    </div>

                </div>
            </div>
        </div>
    </body>
    <script src="/Public/Leader/js/jquery.js" type="text/javascript" charset="utf-8"></script>
    <script src="/Public/Leader/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
                                function tj() {

                                    $.ajax({
                                        type: "POST",
                                        url: "/admin.php/Wx/Paysetting",

                                        cache: false,
                                        data: $('#tab').serialize(),

                                        success: function (data) {
                                            data = $.trim(data);
                                            switch (data) {

                                                case '0':
                                                    alert('修改成功');
                                                    window.location.replace("/admin.php/Wx/Paysetting")
                                                    break;
                                                case '1':
                                                    alert('修改失败');

                                                    break;
                                                case '3':
                                                    alert('用户编号已存在');

                                                    break;

                                                default:
                                                    alert(data);
                                            }

                                        }




                                    })


                                }
    </script>

    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function () {
            $('.demo-cancel-click').click(function () {
                return false;
            });
        });
    </script>
</html>